import 'package:flutter/material.dart';

void main() => runApp(const DefaultTextStyleWidget());

class DefaultTextStyleWidget extends StatelessWidget {
  const DefaultTextStyleWidget({Key? key}) : super(key: key);

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: "Flutter Demo",
      theme: ThemeData(
        primaryColor: Colors.blue,
      ),
      home: Scaffold(
          appBar: AppBar(title: const Text("Flutter UI基础Widget -- 文本")),
          body: DefaultTextStyle(
            style: const TextStyle(
                color: Colors.red,
                fontSize: 20.0,
                decoration: TextDecoration.lineThrough),
            child: Column(
              children: const <Widget>[
                Text("Hello Flutter"),
                Text("Hello World")
              ],
            ),
          )),
    );
  }
}
